﻿using System;
using System.Collections.Generic;
using System.Text;
using FunctionalCLR.Core.Function.Flow;

namespace FunctionalCLR.Core.Function.Flow {

    /// <summary>
    /// square(x):={return x*2;};
    /// echo(square(3));
    /// </summary>
    public class BlockNode : FuncNode {

        public BlockNode()
            : base() {
            base.Value = "block";
        }

        public override object Evaluate() {
            for (int index = Children.Count - 1; index >= 0; index--) {
                Children[index].Evaluate();
            }

            return string.Empty;
        }
    }
}
